<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <!-- <section class="content-header">
      <h1>
        <i class="fa fa-tachometer" aria-hidden="true"></i> 订单管理
      </h1>
    </section> -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12 text-left">
                <div class="form-group">
                    <a class="btn btn-primary addNewOrder" href="javascript:void(0)"><i class="fa fa-plus"></i> 创建新订单</a>
                </div>
            </div>
        </div>
    	<div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">订单列表</h3>
            </div>
            <table class="table table-striped table-hover table-bordered table-condensed">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>订单类型</th>
                        <th>订单状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>1</td>
                        <td>生产订单</td>
                        <td>生产中</td>
                        <td>
                            <a href="" class="btn btn-info btn-sm">查看</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </section>

        <div class="modal modal-primary fade" id="addNewOrderModal">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                  <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">创建新订单</h4>
              </div>
              <div class="modal-body">
                <div class="row">
                    <div class="col-md-6">
                        <button class="btn btn-warning btn-lg" data-action="createOrder" data-target="product">创建生产订单</button>
                        <br>
                        <address>
                            <p>生产订单是指发送给工厂用于生产的订单</p>
                        </address>
                    </div>
                    <div class="col-md-6">
                        <button class="btn btn-success btn-lg" data-action="createOrder" data-target="ship">创建出货订单</button>
                        <br>
                        <address>
                            <p>出货订单指计划物流发送至亚马逊仓库的订单，该订单可以升级为贴码订单</p>
                        </address>
                    </div>
                </div>

              </div>
              
            </div>
            <!-- /.modal-content -->
          </div>
          <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->

    <script type="text/javascript">
        $(function(){
            $('.addNewOrder').on('click', function(){
                $('#addNewOrderModal').modal('show');
            })

            $('[data-action]').on('click', function(){
                var target = $(this).data('target');
                window.location.href = "orderMng/create/" + target;
            })
        })
    </script>

    
</div>